import subprocess
from shutil import copy
swcpath = "bin/LiquifyComps"
process = subprocess.Popen(["hg", "log", "-r .", "--template", r"{latesttag}-{latesttagdistance}-{node|short}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
postfix = process.communicate()[0]
copy(swcpath+".swc", swcpath+"-"+postfix+".swc")